package com.sgcc.ln.pmos.e_ln_home.bean;

public class FileBean {
    private String id;
    private String name;
    private String fileType;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getFileType() {
        return getFileExtension(name);
    }

    public void setFileType(String fileType) {
        this.fileType = fileType;
    }

    private static String getFileExtension(String fileName) {
        if (fileName.lastIndexOf(".") != -1 && fileName.lastIndexOf(".") != 0)
            return fileName.substring(fileName.lastIndexOf(".") + 1);
        else return "";

    }
}